package com.example.strategy.strategy;

public class StrategyContext {

    private Strategy strategy;

    public Strategy getStrategy() {
        return strategy;
    }

    public void setStrategy(Strategy strategy) {
        this.strategy = strategy;
    }

    public Double calRecharge(Double charge,Integer type){
        strategy=StrategyFactory.getInstance().creator(type);
        return strategy.calRecharge(charge);
    }
}
